#AA
<to_1>
#fc(apr,4,==,1,3); goto(2); label(3); text(0,II); label(2);
#fc(apr,4,!=,1,2); text(0,II); label(2);

fc(c4,apr,==,1); and; not; item(check:eq,caskey,1) ;if(nowres); text(0,II); endif;
#fade(out,(type=fade,color=000000,wait=16)); fc(move,*actor,2,7,-13,3); changemap(Agl); mapname(0); fade(in,(type=fade,color=000000,wait=16));
fade(out,(type=mosaic,wait=16)); fc(*actor,move,7,-13,center); fc(*actor,dir,=,l); changemap(Agl); mapname(0); fc(uam,apr,=,0); fade(in,(type=mosaic,wait=16));


#AKiP
<kd1>
#fade(out,(type=fade,color=000000,wait=16)); fc(move,*actor,2,4,4,1); fade(in,(type=fade,color=000000,wait=16));
fade(out,(type=mosaic,wait=16)); fc(*actor,move,4,4,center); fc(*actor,dir,=,l); fade(in,(type=mosaic,wait=16));
evflag(*inmap:saitan,=,0);


#AKiQ
<kd2>
#fade(out,(type=fade,color=000000,wait=16)); fc(move,*actor,2,13,1,1); fade(in,(type=fade,color=000000,wait=16));
fade(out,(type=mosaic,wait=16)); fc(*actor,move,13,1,center); fc(*actor,dir,=,l); fade(in,(type=mosaic,wait=16));
evflag(*inmap:saitan,=,0);


#AKiR
<kd3>
#fade(out,(type=fade,color=000000,wait=16)); fc(move,*actor,2,0,0,0); fade(in,(type=fade,color=000000,wait=16));
fade(out,(type=mosaic,wait=16)); fc(*actor,move,0,0,center); fc(*actor,dir,=,r); fade(in,(type=mosaic,wait=16));
evflag(*inmap:saitan,=,0);

#mfade(ff0000,0);
#fade(out,fade,ff0000,128,32); fade(fade,0;
#mfade(ff0000,128);


#AKiPiA^j
<kd1b>
#fade(out,(type=mosaic,wait=16)); fc(move,*actor,2,4,4,1); changemap(AglQ|S); mapname(0); fade(in,(type=mosaic,wait=16));
fade(out,(type=mosaic,wait=16)); fc(*actor,move,4,4,center); fc(*actor,dir,=,l); mfade(0,000080,192); mfade(1,000080,128); music(main,=,*def:-9600);
#music(main,=,*silent:-2000);
#ŠʗL
fc(c3,apr,=,0);
fcslc(c4); while; if(nowres); fc(*select,apr,=,1); fcslc(*nextlabel); next; endif; wend;
evflag(*inmap:saitan,==,1); if(nowres); fc(uam,apr,=,1); endif;
#fc(c4,apr,=,1);
#fc(apr,5,=,1);
fade(in,(type=mosaic,wait=16));


#AKiQiA^j
<kd2b>
#fade(out,(type=mosaic,wait=16)); fc(move,*actor,2,13,1,1); changemap(AglQ|Q); mapname(0); fade(in,(type=mosaic,wait=16));
fade(out,(type=mosaic,wait=16)); fc(*actor,move,13,1,center); fc(*actor,dir,=,l); mfade(0,000080,96); mfade(1,000080,64); music(main,=,*def:-1000); fade(in,(type=mosaic,wait=16));
fc(c1,apr,=,0); fc(c2,apr,=,1);


#AKiRiA^j
<kd3b>
#fade(out,(type=mosaic,wait=16)); fc(move,*actor,2,0,0,0); changemap(AglQ|R); mapname(0); fade(in,(type=mosaic,wait=16));
fade(out,(type=mosaic,wait=16)); fc(*actor,move,0,0,center); fc(*actor,dir,=,r); mfade(0,000080,144); mfade(1,000080,76); music(main,=,*def:-2000); fade(in,(type=mosaic,wait=16));
fc(c2,apr,=,0); fc(c3,apr,=,1);


#AKiPinYj
<kd1c>
#fade(out,(type=mosaic,wait=16)); fc(move,*actor,2,4,4,1); changemap(AglQ); mapname(0); fade(in,(type=mosaic,wait=16));
fade(out,(type=mosaic,wait=16)); fc(*actor,move,4,4,center); fc(*actor,dir,=,l); fade(in,(type=mosaic,wait=16));
fc(c1,apr,=,1); fc(c2,apr,=,0); fc(c3,apr,=,0); fc(c4,apr,=,0); fc(uam,apr,=,0);


#AKiQinYj
<kd2c>
#fade(out,(type=mosaic,wait=16)); fc(move,*actor,2,13,1,1); changemap(AglQ); mapname(0); fade(in,(type=mosaic,wait=16));
fade(out,(type=mosaic,wait=16)); fc(*actor,move,13,1,center); fc(*actor,dir,=,l); fade(in,(type=mosaic,wait=16));
fc(c1,apr,=,1); fc(c2,apr,=,0); fc(c3,apr,=,0); fc(c4,apr,=,0); fc(uam,apr,=,0);


#AKiRinYj
<kd3c>
#fade(out,(type=mosaic,wait=16)); fc(move,*actor,2,0,0,0); changemap(AglQ); mapname(0); fade(in,(type=mosaic,wait=16));
fade(out,(type=mosaic,wait=16)); fc(*actor,move,0,0,center); fc(*actor,dir,=,r); fade(in,(type=mosaic,wait=16));
fc(c1,apr,=,1); fc(c2,apr,=,0); fc(c3,apr,=,0); fc(c4,apr,=,0); fc(uam,apr,=,0);


#
<mutou>
subevent(passbattle,); if(nowres); fc(*target,apr,=,0); end; endif;
sound(boon); fade(out,(type=fade,color=000000,dep=128,wait=32)); fade(in,(type=fade,color=000000,dep=128,wait=32));
#text(1,(ym=c,dsp=2,keyok=0,lwait=64),u%s3PPPEEE閧\Ă܂҂͖E˂΂ȂȂEEEv);
text(1,(ym=c,dsp=2,keyok=0,lwait=64,inneralign=0),%s3PPPEEE\n閧\Ă܂҂͖E˂΂ȂȂEEE);
feffect(mutou,,*actor,*actor,1); return;

#formem(party); member(select,pcond, cond,,+=,(U(3),h(3))); nextmem();
#formem(party); member(select,pcond, cond,,+=,); nextmem();

fade(out,(type=btdefo,color=btdefo,dep=btdefo,rot=btdefo,wait=btdefo)); battle((enegr=,bgm=battle2:0,winbgm=win:0,stm=0,btm=ne,downefc=down3)); fade(in2,);
#,mfade=000000:128
evflag(*selected,==,1); if(nowres); fc(*target,apr,=,0); end; endif;
evflag(*selected,==,3); if(nowres); fc(*actor,walk,1,8,-1,0,r); return; end; endif;


#
<evmark>
item(check:eq,̈,1); if(nowres);
#music(*silent,0);
#item(check:eq,,1); and; item(check:eq,,1); if(nowres);
subevent(evolution,);
#music(def,def);
item(change:eq,̈,,1);
text(1,(face=uam,swait=-1),w%ct2%it[*̈].nmic%cdxw%ct2%it[*].nmri%cdxɐiIII);
#else; #text(1,face=uam,ƏɍXȂ͂^AėׂB); endif;
else;
item(check:eq,,1); if(nowres);
text(1,(face=uam,lwait=0,select=߂\n߂Ȃ,islc=1),w%it[*].nmicxw%it[*̈].nmicxɖ߂܂H\n%ct3Ė߂ĂTȂǂ͗L܂B%cd);
#select(reset); select(+͂(id=0)); select(+); select(/); select(*(cid=));
evflag(*selected,==,0); if(nowres); item(change:eq,,̈,1); endif;
else; text(1,(face=uam,swait=-1),ƂėׂB);
endif;
endif;
subevent(recover,);